// 集中配置路由关系（路径---页面组件）
import {createRouter,createWebHashHistory} from 'vue-router'
import DashBoard from '../views/dashboard/index.vue'
import Product from '../views/product/index.vue'
import Batch from '../views/batch/index.vue'
//路由映射关系数据包
export const routes = [ 
  {
    path:'/dashboard',
    component:DashBoard,
    meta:{
      title:'数据仪表盘',
      icon:'TrendCharts'  //图标名称需要跟组件库对应
    }
  },
  {
    path:'/prod',
    component:Product,
    meta:{
      title:'商品管理',
      icon:'GoodsFilled'  //图标名称需要跟组件库对应
    }
  },
  {
    path:'/test/batch',
    component:Batch,
    meta:{
      title:'数据转存',
      icon:'Grid'  //图标名称需要跟组件库对应
    }
  },
]

const router = createRouter({
  'history':createWebHashHistory(),  //启用哈希路由模式
  'routes':routes
})

export default router  //抛出路由对象